import request from '../utils/request'
export function getinfos(data) {
  return request({
    url: 'api/sys/user',
    method: 'get',
    'params': data

  })
}
export function dodel(id) {
  return request({
    method: 'delete',
    url: `api/sys/user/${id}`
  })
}
export function addinfo(data) {
  return request({
    method: 'post',
    url: 'api/sys/user',
    data
  })
}
<<<<<<< HEAD
export function updateById(data) {
=======
export function importEmployee(data) {
  return request({
    url: 'api/sys/user/batch',
    method: 'post',
    data
  })
}

export function updateMenus(data) {
>>>>>>> a9972fb9b0473e8e8d6ab928bdacb7c4e00fcd7f
  return request({
    url: `api/sys/user/${data.id}`,
    method: 'put', // 全量修改
    data
  })
}
/**
 * @description: 为用户分配角色
 * @param {*} data { id:当前用户id, roleIds:选中的角色id组成的数组 }
 * @return {*}
 */
export function assignRoles(data) {
  return request({
    url: 'api/sys/user/assignRoles',
    data,
    method: 'put'
  })
}
